﻿@model IEnumerable<ChampionFramework.Models.Evento>
@{
	ViewBag.Title = "Tempo Real";
}
<h2>
	Tempo Real</h2>
<fieldset>
	<legend>Gols</legend>
	<p>
		@Html.ActionLink("Create New", "../Gol/Create")
	</p>
	<table>
		<tr>
			<th>
				Descrição
			</th>
			<th>
				Minutos
			</th>
			<th>
				Segundos
			</th>
			<th>
				Jogador
			</th>
			<th>
				Contra
			</th>
			<th>
			</th>
		</tr>
		@foreach (var item in Model.OfType<ChampionFramework.Models.Gol>())
  {
			<tr>
				<td>
					@Html.DisplayFor(modelItem => item.Descricao)
				</td>
				<td>
					@Html.DisplayFor(modelItem => item.Minutos)
				</td>
				<td>
					@Html.DisplayFor(modelItem => item.Segundos)
				</td>
				<td>
					@Html.DisplayFor(modelItem => item.Jogador.Nome)
				</td>
				<td>
					@Html.DisplayFor(modelItem => item.Contra)
				</td>
				<td>
					@Html.ActionLink("Edit", "../Gol/Edit", new { id = item.Id }) |
					@Html.ActionLink("Details", "../Gol/Details", new { id = item.Id }) |
					@Html.ActionLink("Delete", "../Gol/Delete", new { id = item.Id })
				</td>
			</tr>
  }
	</table>
</fieldset>
<fieldset>
	<legend>Cartões</legend>
	<p>
		@Html.ActionLink("Create New", "../Cartao/Create")
	</p>
	<table>
		<tr>
			<th>
				Descrição
			</th>
			<th>
				Minutos
			</th>
			<th>
				Segundos
			</th>
			<th>
				Jogador
			</th>
			<th>
				Tipo
			</th>
			<th>
			</th>
		</tr>
		@foreach (var item in Model.OfType<ChampionFramework.Models.Cartao>())
  {
			<tr>
				<td>
					@Html.DisplayFor(modelItem => item.Descricao)
				</td>
				<td>
					@Html.DisplayFor(modelItem => item.Minutos)
				</td>
				<td>
					@Html.DisplayFor(modelItem => item.Segundos)
				</td>
				<td>
					@Html.DisplayFor(modelItem => item.Jogador.Nome)
				</td>
				<td>
					@(item.Tipo == 1 ? "Amarelo" : "Vermelho")
				</td>
				<td>
					@Html.ActionLink("Edit", "../Cartao/Edit", new { id = item.Id }) |
					@Html.ActionLink("Details", "../Cartao/Details", new { id = item.Id }) |
					@Html.ActionLink("Delete", "../Cartao/Delete", new { id = item.Id })
				</td>
			</tr>
  }
	</table>
</fieldset>
<fieldset>
	<legend>Falta</legend>
	<p>
		@Html.ActionLink("Create New", "../Falta/Create")
	</p>
	<table>
		<tr>
			<th>
				Descrição
			</th>
			<th>
				Minutos
			</th>
			<th>
				Segundos
			</th>
			<th>
				Jogador
			</th>
			<th>
			</th>
		</tr>
		@foreach (var item in Model.OfType<ChampionFramework.Models.Falta>())
  {
			<tr>
				<td>
					@Html.DisplayFor(modelItem => item.Descricao)
				</td>
				<td>
					@Html.DisplayFor(modelItem => item.Minutos)
				</td>
				<td>
					@Html.DisplayFor(modelItem => item.Segundos)
				</td>
				<td>
					@Html.DisplayFor(modelItem => item.Jogador.Nome)
				</td>
				<td>
					@Html.ActionLink("Edit", "../Falta/Edit", new { id = item.Id }) |
					@Html.ActionLink("Details", "../Falta/Details", new { id = item.Id }) |
					@Html.ActionLink("Delete", "../Falta/Delete", new { id = item.Id })
				</td>
			</tr>
  }
	</table>
</fieldset>
<fieldset>
	<legend>Lesões</legend>
	<p>
		@Html.ActionLink("Create New", "../Lesao/Create")
	</p>
	<table>
		<tr>
			<th>
				Descrição
			</th>
			<th>
				Minutos
			</th>
			<th>
				Segundos
			</th>
			<th>
				Jogador
			</th>
			<th>
			</th>
		</tr>
		@foreach (var item in Model.OfType<ChampionFramework.Models.Lesao>())
  {
			<tr>
				<td>
					@Html.DisplayFor(modelItem => item.Descricao)
				</td>
				<td>
					@Html.DisplayFor(modelItem => item.Minutos)
				</td>
				<td>
					@Html.DisplayFor(modelItem => item.Segundos)
				</td>
				<td>
					@Html.DisplayFor(modelItem => item.Jogador.Nome)
				</td>
				<td>
					@Html.ActionLink("Edit", "../Lesao/Edit", new { id = item.Id }) |
					@Html.ActionLink("Details", "../Lesao/Details", new { id = item.Id }) |
					@Html.ActionLink("Delete", "../Lesao/Delete", new { id = item.Id })
				</td>
			</tr>
  }
	</table>
</fieldset>
<fieldset>
	<legend>Substituições</legend>
	<p>
		@Html.ActionLink("Create New", "../Substituicao/Create")
	</p>
	<table>
		<tr>
			<th>
				Descrição
			</th>
			<th>
				Minutos
			</th>
			<th>
				Segundos
			</th>
			<th>
				Jogador
			</th>
			<th>
				Jogador Substituido
			</th>
			<th>
			</th>
		</tr>
		@foreach (var item in Model.OfType<ChampionFramework.Models.Substituicao>())
  {
			<tr>
				<td>
					@Html.DisplayFor(modelItem => item.Descricao)
				</td>
				<td>
					@Html.DisplayFor(modelItem => item.Minutos)
				</td>
				<td>
					@Html.DisplayFor(modelItem => item.Segundos)
				</td>
				<td>
					@Html.DisplayFor(modelItem => item.Jogador.Nome)
				</td>
				<td>
					@Html.DisplayFor(modelItem => item.JogadorSubstituido.Nome)
				</td>
				<td>
					@Html.ActionLink("Edit", "../Substituicao/Edit", new { id = item.Id }) |
					@Html.ActionLink("Details", "../Substituicao/Details", new { id = item.Id }) |
					@Html.ActionLink("Delete", "../Substituicao/Delete", new { id = item.Id })
				</td>
			</tr>
  }
	</table>
</fieldset>
